package ABBB;

public class Pc {
    private String brand;
    private int price;
    private  Cpu c;
    private Neicun e;
    private Yingpan h;
    private  Usb u ;


    public void show(){
        System.out.println("这个电脑的品牌是："+brand+"价格是："+price+"有这些配件：");
        System.out.println(getC());
        System.out.println(getE());
        System.out.println(getH());
    }
    public void work(){
        c.work();
        e.work();
        h.work();
        u.work();
    }

    public Cpu getC() {
        return c;
    }

    public void setC(Cpu c) {
        c.jieru();
        this.c = c;
    }

    public Neicun getE() {
        return e;
    }

    public Usb getU() {
        return u;
    }

    public void setU(Usb u) {
        u.jieru();
        this.u = u;
    }

    public void setE(Neicun e) {
        e.jieru();
        this.e = e;
    }

    public Yingpan getH() {
        return h;
    }

    public void setH(Yingpan h) {
        h.jieru();
        this.h = h;
    }

    public Pc(String brand, int price) {
        this.brand = brand;
        this.price = price;
    }

    public String getBrand() {
        return brand;
    }

    public void setBrand(String brand) {
        this.brand = brand;
    }

    public int getPrice() {
        return price;
    }

    public void setPrice(int price) {
        this.price = price;
    }
}
